<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Hopper_EV2000_Boost_DLL: hopper_ev2000_dll.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Hopper_EV2000_Boost_DLL
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">hopper_ev2000_dll.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="hopper__ev2000__dll_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00020"></a>00020 <span class="comment">/*</span>
<a name="l00021"></a>00021 <span class="comment"> * hopper_ev2000_dll.h</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> *  Created on: 24.12.2012</span>
<a name="l00024"></a>00024 <span class="comment"> *      Author: aska</span>
<a name="l00025"></a>00025 <span class="comment"> */</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef HOPPER_EV2000_DLL_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define HOPPER_EV2000_DLL_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include &lt;windows.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">using namespace </span>std;
<a name="l00036"></a>00036 <span class="comment">/*</span>
<a name="l00037"></a>00037 <span class="comment">#ifdef HOPPER_EV2000_DLL_H_EXPORTS</span>
<a name="l00038"></a>00038 <span class="comment">#define HOPPER_EV2000_DLL_H_API __declspec(dllexport)</span>
<a name="l00039"></a>00039 <span class="comment">#else</span>
<a name="l00040"></a>00040 <span class="comment">#define HOPPER_EV2000_DLL_H_API __declspec(dllimport)</span>
<a name="l00041"></a>00041 <span class="comment">#endif</span>
<a name="l00042"></a>00042 <span class="comment">*/</span>
<a name="l00043"></a>00043 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="comment">//  Errors returned by functions that accesses to cctalk</span>
<a name="l00048"></a>00048 <span class="comment">//  0 - no errors</span>
<a name="l00049"></a>00049 <span class="comment">//  1 - checksum error</span>
<a name="l00050"></a>00050 <span class="comment">//  2 - no data received</span>
<a name="l00051"></a>00051 <span class="comment">//  3 - other exception</span>
<a name="l00052"></a>00052 <span class="comment">//  254 - port is not opened</span>
<a name="l00053"></a>00053 <span class="comment">//  255 - hopper is not initialized</span>
<a name="l00054"></a>00054 __declspec(dllexport) BOOL WINAPI __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
<a name="l00055"></a>00055 <span class="comment">//__declspec(dllexport) int __stdcall door_control_dev_if_mode(int mode);</span>
<a name="l00056"></a>00056 
<a name="l00066"></a>00066 <span class="comment">//HOPPER_EV2000_DLL_H_API</span>
<a name="l00067"></a>00067 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_init(<span class="keywordtype">void</span>);
<a name="l00101"></a>00101 <span class="comment">//HOPPER_EV2000_DLL_H_API</span>
<a name="l00102"></a>00102 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_init_prepare_mode_d2xx(<span class="keywordtype">int</span> mode, <span class="keywordtype">int</span> inp_par, <span class="keywordtype">int</span> port_No, <span class="keywordtype">char</span> * vpPort_name);
<a name="l00107"></a>00107 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_init_prepare_mode_d2xx_portNo(<span class="keywordtype">int</span> mode, <span class="keywordtype">int</span> port_No);
<a name="l00116"></a>00116 <span class="comment">//HOPPER_EV2000_DLL_H_API</span>
<a name="l00117"></a>00117 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_close(<span class="keywordtype">void</span>);
<a name="l00127"></a>00127 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_set_mode(<span class="keywordtype">char</span> dev_interface_mode_inp);
<a name="l00136"></a>00136 <span class="comment">//HOPPER_EV2000_DLL_H_API</span>
<a name="l00137"></a>00137 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_port_open(<span class="keywordtype">char</span> * vpPort_name);
<a name="l00146"></a>00146 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_d2xx_open();
<a name="l00155"></a>00155 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_send_simple_poll(<span class="keywordtype">char</span> addr);
<a name="l00164"></a>00164 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_address_poll(<span class="keywordtype">char</span> * addr);
<a name="l00190"></a>00190 <span class="comment">// пример:</span>
<a name="l00191"></a>00191 <span class="comment">//  не удалось открыть порт</span>
<a name="l00192"></a>00192 <span class="comment">//  b00010100 (d20)</span>
<a name="l00193"></a>00193 <span class="comment">//     |||| |--- 2-ой бит установлен - ошибки при открытии порта</span>
<a name="l00194"></a>00194 <span class="comment">//     \__/ значение 1 - не удалось открыть порт</span>
<a name="l00195"></a>00195 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_prepare(<span class="keywordtype">int</span> inp_par, <span class="keywordtype">int</span> port_No, <span class="keywordtype">char</span> * vp_Port_name);
<a name="l00196"></a>00196 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_prepare_addr(<span class="keywordtype">char</span> addr);
<a name="l00197"></a>00197 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_comms_revision(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00198"></a>00198 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_comm_status_variables(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00199"></a>00199 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_clear_comms_variables(<span class="keywordtype">char</span> addr);
<a name="l00200"></a>00200 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_reset_device(<span class="keywordtype">char</span> addr);
<a name="l00201"></a>00201 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_manufacturer_id(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00202"></a>00202 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_equipment_category_id(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00203"></a>00203 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_product_code(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00204"></a>00204 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_serial_nr(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00205"></a>00205 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_software_revision(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00206"></a>00206 <span class="comment">//...</span>
<a name="l00207"></a>00207 <span class="comment">/*\brief get hopper test</span>
<a name="l00208"></a>00208 <span class="comment"> * char vp_hopper_registers[]:</span>
<a name="l00209"></a>00209 <span class="comment"> * - [0] - hopper address</span>
<a name="l00210"></a>00210 <span class="comment"> * - [1] - status register 1</span>
<a name="l00211"></a>00211 <span class="comment"> * - [2] - status register 2</span>
<a name="l00212"></a>00212 <span class="comment"> *</span>
<a name="l00213"></a>00213 <span class="comment"> */</span>
<a name="l00214"></a>00214 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_test_hopper(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_hopper_registers[]);
<a name="l00215"></a>00215 <span class="comment">/*\brief get hopper status</span>
<a name="l00216"></a>00216 <span class="comment"> * char vp_byte_arr[]:</span>
<a name="l00217"></a>00217 <span class="comment"> * - [0] - hopper address</span>
<a name="l00218"></a>00218 <span class="comment"> * - [1] - event counter</span>
<a name="l00219"></a>00219 <span class="comment"> * - [2] - payout coins remaining</span>
<a name="l00220"></a>00220 <span class="comment"> * - [3] - last payout: coins paid</span>
<a name="l00221"></a>00221 <span class="comment"> * - [4] - last payout: coins unpaid</span>
<a name="l00222"></a>00222 <span class="comment"> */</span>
<a name="l00223"></a>00223 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_status(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00224"></a>00224 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_emergency_stop(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00225"></a>00225 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_empty_hopper(<span class="keywordtype">char</span> addr, <span class="keywordtype">int</span> coins_to_put);
<a name="l00226"></a>00226 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_payout_hi_lo_status(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00227"></a>00227 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_payout_hi_status(<span class="keywordtype">char</span> addr, <span class="keywordtype">bool</span> * out_bool);
<a name="l00228"></a>00228 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_payout_lo_status(<span class="keywordtype">char</span> addr, <span class="keywordtype">bool</span> * out_bool);
<a name="l00229"></a>00229 <span class="comment">//...</span>
<a name="l00230"></a>00230 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_request_dispense_count(<span class="keywordtype">char</span> addr, <span class="keywordtype">char</span> vp_byte_arr[]);
<a name="l00231"></a>00231 <span class="comment">//...</span>
<a name="l00241"></a>00241 <span class="comment"></span>__declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_put_coins_ack(<span class="keywordtype">char</span> addr, <span class="keywordtype">int</span> Coins_count,
<a name="l00242"></a>00242         <span class="keywordtype">int</span> * Coins_rem, <span class="keywordtype">int</span> * Coins_paid, <span class="keywordtype">int</span> * Coins_unpaid);
<a name="l00243"></a>00243 __declspec(dllexport) <span class="keywordtype">bool</span> __stdcall hopper_get_high_sensor(<span class="keywordtype">char</span> addr);
<a name="l00244"></a>00244 __declspec(dllexport) <span class="keywordtype">bool</span> __stdcall hopper_get_low_sensor(<span class="keywordtype">char</span> addr);
<a name="l00245"></a>00245 __declspec(dllexport) <span class="keywordtype">int</span> __stdcall hopper_get_error(byte addr);
<a name="l00246"></a>00246 
<a name="l00247"></a>00247 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00248"></a>00248 <span class="preprocessor"></span>}
<a name="l00249"></a>00249 <span class="preprocessor">#endif</span>
<a name="l00250"></a>00250 <span class="preprocessor"></span>
<a name="l00251"></a>00251 <span class="preprocessor">#endif </span><span class="comment">/* HOPPER_EV2000_DLL_H_ */</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 15 2013 15:24:43 for Hopper_EV2000_Boost_DLL by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
